package com.company.Enum;

/**
 * Created by jiayazi on 18/1/9.
 *
 *
 * -------   课时属性----------
 */
public enum ThirdLoginEnum {
    GZH(1,"wx_zgh"),
    XCC(2,"wx_xcx"),
    CS(4,"cs"),
    XCCONLINE(3,"xcx_online");

    /** 积分类型（1.打卡2.点赞.3分享4.兑换）*/
    private Integer type;
    private String desc;

    ThirdLoginEnum(Integer integral, String desc) {
        this.type = integral;
        this.desc = desc;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static ThirdLoginEnum getEnumByType(Integer type) {
        for (ThirdLoginEnum statu : values()) {
            if (type == statu.type) {
                return statu;
            }
        }
        return null;
    }
}
